package main

import "fmt"

type Humaner2 interface {
	//子集

	SayHi()
}

type Personer interface {
	//超集

	Humaner2 //一组子集的集合
	Sing(string)
}

type student3 struct {
	name string
	age  int
	sex  string
}

func (s *student3) SayHi() {
	fmt.Printf("%s说hi\n", s.name)
}

func (s student3) Sing(name string) {
	fmt.Printf("%s在唱歌,给大家唱一首%s\n", s.name, name)
}

func main() {
	var h Humaner2
	h = &student3{"刘亦菲", 29, "女"}
	h.SayHi()

	var h1 Personer
	h1 = &student3{"王菲", 33, "女"}
	h1.SayHi()
	h1.Sing("传奇")

	//超集转换为子集
	h = h1
	h.SayHi()
}
